package com.goods.pojo;


import java.io.Serializable;
import java.util.Date;

public class CpspBean implements Serializable {

	private static final long serialVersionUID = -8222140581769899458L;
	
	private int id;
	private int parentId;
	private String name;
	private String code;
	private int type;//0内容提供商 1服务提供商
	private int review;//0需审核 1不用审核
	private int isDefault;//0缺省 1不缺省
	private int state;//0未审核 1已审核
	private Date createDate;
	private int mainCpspid;//主运营商id, 默认0, 0代表没有主运营商
	private String createdatetime;
    private int childCount;
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public int getReview() {
		return review;
	}
	public void setReview(int review) {
		this.review = review;
	}
	
	public int getIsDefault() {
		return isDefault;
	}
	public void setIsDefault(int isDefault) {
		this.isDefault = isDefault;
	}

	public void setState(int state) {
		this.state = state;
	}


	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public int getParentId() {
		return parentId;
	}
	public void setParentId(int parentId) {
		this.parentId = parentId;
	}
	public String getCreatedatetime() {
		return createdatetime;
	}
	public void setCreatedatetime(String createdatetime) {
		this.createdatetime = createdatetime;
	}
	public int getMainCpspid() {
		return mainCpspid;
	}
	public void setMainCpspid(int mainCpspid) {
		this.mainCpspid = mainCpspid;
	}
	public int getChildCount() {
		return childCount;
	}
	public void setChildCount(int childCount) {
		this.childCount = childCount;
	}
	
	//为EasyUI.tree准备格式
    public String getText() {
        return this.name;
    }
    public String getState(){
        return this.childCount > 0 ? "closed" : "open";//如果是树枝，默认关闭，支持异步加载
    }

}
